package com.jiao.testdemo.pattern.iterator;

import java.util.ArrayList;
import java.util.List;

/**
 * TODO(文件概要)
 *
 * <p> TODO(具体描述信息,可以不填)
 *
 * @author meetsocial
 * @version V1.0
 * @className: Aggregate
 * @date 2024/11/15 10:48
 */
public class Aggregate {

    private List<Object> items = new ArrayList<>();

    public void add(Object item) {
        items.add(item);
    }

    public Iterator iterator() {
        return new ConcreteIterator(items);
    }
}
